package com.shensi.api.admin.client.label;

import com.shensi.api.admin.client.fallback.label.LabelRuleClientFallBack;
import com.shensi.api.admin.domian.label.dto.LabelRuleDto;
import com.shensi.api.admin.domian.label.dto.RequsetSysDeptDto;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.page.TableDataInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = LabelRuleClientFallBack.class)
@Component
public interface LabelRuleClient {

    /**
     * 查询标签规则列表
     */
    @GetMapping("/label/rule/list")
    @ApiOperation("查询标签规则列表")
    public TableDataInfo list(@SpringQueryMap LabelRuleDto labelRule);
    /**
     * 查询当前人员的标签信息
     */
    @GetMapping("/label/rule/listByLogin")
    public TableDataInfo listByLogin();
    /**
     * 查詢油站的所有標簽
     * @param labelRule
     * @return
     */
    @GetMapping("/label/rule/labelList")
    @ApiOperation("查詢油站的所有標簽")
    public TableDataInfo labelList(@SpringQueryMap LabelRuleDto labelRule);


    /**
     * 导出标签规则列表
     */
    @GetMapping("/label/rule/export")
    public AjaxResult export(@SpringQueryMap LabelRuleDto labelRule);

    /**
     * 获取标签规则详细信息
     */
    @GetMapping(value = "/label/rule/{id}")
    public AjaxResult getInfo(@PathVariable("id") Integer id);

    /**
     *标签功能是否开启,标签名
     */

    @GetMapping("/label/rule/sysDeptDemoList")
    public AjaxResult sysDeptDemoList();

    @GetMapping("/label/rule/selectLabelList")
    public AjaxResult selectLabelList();

    @PostMapping("/label/rule/addlabel")
    public AjaxResult addlabel(@RequestBody RequsetSysDeptDto requsetSysDept);


    @PostMapping("/label/rule/addlabelrule")
    public AjaxResult addlabelrule(@RequestBody LabelRuleDto labelRule);

    /**
     * 修改标签规则
     */
    @PutMapping("/label/rule")
    public AjaxResult edit(@RequestBody LabelRuleDto labelRule);

    /**
     * 删除标签规则
     */
    @DeleteMapping("/label/rule/{ids}")
    public AjaxResult remove(@PathVariable("ids") Integer[] ids);


}
